<script>
export default {
  name: 'Join',
  render: function(h) {
    const DOMLi = (list) => {
      let ret = []
      list.forEach((li, index) => {
        if (index === 0) {
          ret.push(h('li', {}, li))
        } else {
          ret.push(
            h('li', {
              class: {
                orgJoinCl: true
              }
            }, this.join),
            h('li', {}, li)
          )
        }
      })

      return ret
    }

    return h('ul', {}, DOMLi(this.list))
  },
  props: {
    list: {
      type: Array,
      default: () => []
    },
    join: {
      type: String,
      default: () => '/'
    },
    joinClass: {
      type: String
    }
  }
}
</script>

<style lang="stylus" scoped>
ul
  li
    float: left
  .orgJoinCl
    padding: 0 10px
</style>
